<?php

namespace app\adminapi\controller\v1\office;

use app\adminapi\controller\AuthController;
use app\services\office\OfficeFeedbackService;
use think\facade\App;

class OfficeFeedback extends AuthController
{

    public function __construct(App $app,OfficeFeedbackService $service)
    {
        parent::__construct($app);
        $this -> services = $service;
    }


    public function index()
    {
        $where = $this->request->postMore([
            ['page', 1],
            ['pageSize', 20],
            ['website_id', $this->website],

        ]);
        return app()->make('json')->successful($this->services->index($where));
    }


    public function delete(){
        $where = $this->request->postMore([
            ['id', ''],
        ]);
        return app() -> make('json') -> successful($this -> services -> delete($where));
    }
}